package com.tianqi.common.enums;
/**
 * @description 山向元龙
 * @author zp
 * @time 2023/8/25 22:25
 */
public enum ShanXiangYuanLongEnum {
    ZI("子","阴","天元龙","1宫"),
    GUI("癸","阴","人元龙","1宫"),
    CHOU("丑","阴","地元龙","8宫"),
    GEN("艮","阳","天元龙","8宫"),
    YIN("寅","阳","人元龙","8宫"),
    JIA("甲","阳","地元龙","3宫"),
    MOU("卯","阴","天元龙","3宫"),
    YI("乙","阴","人元龙","3宫"),
    CHEN("辰","阴","地元龙","4宫"),
    XUN("巽","阳","天元龙","4宫"),
    SI("巳","阳","人元龙","4宫"),
    BING("丙","阳","地元龙","9宫"),
    WU("午","阴","天元龙","9宫"),
    DING("丁","阴","人元龙","9宫"),
    WEI("未","阴","地元龙","2宫"),
    KUN("坤","阳","天元龙","2宫"),
    SHEN("申","阳","人元龙","2宫"),
    GENG("庚","阳","地元龙","7宫"),
    YOU("酉","阴","天元龙","7宫"),
    XIN("辛","阴","人元龙","7宫"),
    XU("戌","阴","地元龙","6宫"),
    QIAN("乾","阳","天元龙","6宫"),
    HAI("亥","阳","人元龙","6宫"),
    REN("壬","阳","地元龙","1宫");


    //山
    private String shan;
    //阴阳
    private String yinyang;
    //元龙
    private String yuanlong;
    //山向所在宫
    private String gong;

    ShanXiangYuanLongEnum(String shan, String yinyang, String yuanlong, String gong) {
        this.shan = shan;
        this.yinyang = yinyang;
        this.yuanlong = yuanlong;
        this.gong = gong;
    }

    public String getShan() {
        return shan;
    }

    public String getYinyang() {
        return yinyang;
    }

    public String getYuanlong() {
        return yuanlong;
    }

    public String getGong() {
        return gong;
    }
    public static ShanXiangYuanLongEnum getValueByelShan(String shan) {
        ShanXiangYuanLongEnum[] shanXiangYuanLong = values();
        for (ShanXiangYuanLongEnum shanXiangYuanLongs : shanXiangYuanLong) {
            if (shanXiangYuanLongs.getShan().equals(shan)) {
                return shanXiangYuanLongs;
            }
        }
        return null;
    }
    public static String getYinyangByGong(String gong,String yuanlong) {
        ShanXiangYuanLongEnum[] shanXiangYuanLong = values();
        for (ShanXiangYuanLongEnum shanXiangYuanLongs : shanXiangYuanLong) {
            if (shanXiangYuanLongs.getGong().equals(gong)&&shanXiangYuanLongs.getYuanlong().equals(yuanlong)) {
                return shanXiangYuanLongs.getYinyang();
            }
        }
        return null;
    }
}
